package com;

import gnu.io.CommPortIdentifier;
import java.util.Enumeration;

public class test
{

    public static void main(String[] args)
    {   
        Enumeration pList = CommPortIdentifier.getPortIdentifiers();
        while (pList.hasMoreElements()) {
          CommPortIdentifier cpi = (CommPortIdentifier) pList.nextElement();
          System.out.print("Port " + cpi.getName() + " ");
        }
    }

}